//
//  UserDetailCell.m
//  TheProjectName
//
//  Created by 李劲成 on 16/5/21.
//  Copyright © 2016年 sunzhichao. All rights reserved.
//

#import "UserDetailCell.h"

@interface UserDetailCell ()

@property (nonatomic, retain) UILabel *m_title;

@property (nonatomic, retain) UILabel *m_info;

@end


@implementation UserDetailCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        self.m_title = [[UILabel alloc]init];
        [self.contentView addSubview:_m_title];
        _m_title.textColor = [UIColor whiteColor];
        self.m_info = [[UILabel alloc]init];
        _m_info.textColor = [UIColor whiteColor];
        [self.contentView addSubview:_m_info];
    }
    return self;
}


- (void)layoutSubviews{
    [super layoutSubviews];
    [_m_title mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView.mas_top).offset(0);
        make.left.equalTo(self.contentView.mas_left).offset(10);
        make.bottom.equalTo(self.contentView.mas_bottom).offset(0);
        make.width.mas_equalTo(SCREEN_WIDTH / 4.f);
    }];
    
    [_m_info mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView.mas_top).offset(0);
        make.bottom.equalTo(self.contentView.mas_bottom).offset(0);
        make.right.equalTo(self.contentView.mas_right).offset(-10);
        make.width.mas_equalTo(SCREEN_WIDTH / 4.f);
        
    }];
    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}


- (void)setTitle:(NSString *)title AndInfo:(NSString *)info {
    if (title) {
        _m_title.text = title;
    }
    if (info) {
        _m_info.text = info;
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
